home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 390 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.4 KB

  1. Path: engnews1.Eng.Sun.COM!taumet!clamage
  2. From: clamage@Eng.sun.com (Steve Clamage)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Problem with template overloading
  5. Date: 20 Feb 1996 21:13:12 GMT
  6. Organization: Sun Microsystems Inc.
  7. Approved: clamage@eng.sun.com (comp.std.c++)
  8. Message-ID: <4gdc6v$cqv@engnews1.Eng.Sun.COM>
  9. References: <4g7ndf$dhs@bcarh8ab.bnr.ca>
  10. Reply-To: clamage@Eng.sun.com
  11. NNTP-Posting-Host: taumet.eng.sun.com
  12. Content-Type: text
  13. X-Nntp-Posting-Host: taumet.eng.sun.com
  14. Content-Length: 544
  15. X-Lines: 16
  16. Originator: clamage@taumet
  17.  
  18. In article dhs@bcarh8ab.bnr.ca, "brian (b.c.) white" <bcwhite@bnr.ca> writes:
  19. >>>Is it allowed to overload template names based on their parameters
  20. >>>in the same way that functions can be overloaded?
  21.  
  22. >>No, that is not allowed. You cannot have more than one template
  23. >>with the same name in the same scope.
  24.  
  25. >Is there a specific reason for this?
  26.  
  27. Yes. Only in special cases would you not have insurmountable ambiguities.
  28. Just as type names must be unique in one scope, so must template names.
  29.  
  30. ---
  31. Steve Clamage, stephen.clamage@eng.sun.com
  32.  
  33.  
  34.  
  35. [ To submit articles: Try just posting with your newsreader.
  36.               If that fails, use mailto:std-c++@ncar.ucar.edu
  37.   FAQ:    http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
  38.   Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
  39.   Comments? mailto:std-c++-request@ncar.ucar.edu
  40. ]
  41.